<!doctype html>
<html>
<head>
    <meta name="Generator"  />
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <title>商品分类</title>
    <meta name="Keywords" content="Call管家" />
    <meta name="Description" content="Call管家" />
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>

    <link rel="stylesheet" href="__HOMECSS__/style.css">
    <link rel="stylesheet" href="__HOMECSS__/swiper.min.css">
    <script src="__HOMEJS__/swiper.min.js"></script>
    <script src="__HOMEJS__/my.js"></script>
    <script src="__HOMEJS__/jquery-1.7.2.min.js"></script>
    <!-- Demo styles -->
    <style>
        html, body {

        }
        body {
            margin-bottom:50px;
        }
        .swiper-container {
            padding: 10px;
            border-bottom: 1px solid #eaeaea;
        }
        .swiper-slide {
            text-align: center;
            font-size: 18px;
            background: #f5f5f5;
            border-radius: 2px;
            /* Center slide text vertically */
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;
            height:34px;
            line-height: 34px;
            font-size: 1rem;
            cursor: pointer;
        }
        .swiper_slide_this{
            background: #e01222;
            color: #fff;
        }
        .swiper-right{
            height: 54px;
            width: 20px;
            top: 0;
            position: fixed;
            background: -webkit-linear-gradient(right,rgba(255,255,255,0),#00000040); /* Safari 5.1 - 6.0 */
            background: -o-linear-gradient(right,rgba(255,255,255,0),#00000040); /* Opera 11.1 - 12.0 */
            background: -moz-linear-gradient(right,rgba(255,255,255,0),#00000040); /* Firefox 3.6 - 15 */
            background-image: linear-gradient(to right,rgba(255,255,255,0),#00000040);
            right: 0;
            z-index: 9;
        }
    </style>
</head>

<body>


<!-- Swiper -->
<div class="swiper-container">
    <div class="swiper-wrapper">
        {foreach name="cateList" item="item"}
            <a href="{:Url('Category/index',['cate_id'=>$item['id']])}" class="swiper-slide aa {if condition='$item["id"] eq input("param.cate_id")'}swiper_slide_this{/if}">{$item.name}</a>
        {/foreach}

    </div>
    {if condition="count($cateList) gt 4"}
        <div class="swiper-right"></div>
    {/if}
    <!-- Add Pagination -->
    <div class="swiper-pagination"></div>
</div>

<!-- 产品 -->
<div class="floor2">

    <ul>
        {foreach name="goodsList" item="item"}
        <li>
            <div class="floor2_img">
                <a href="{:Url('Goods/detail',['id'=>$item['id']])}">
                    <img src="{$item.image}" alt="">
                </a>
            </div>
            <div class="floor2_p">
                <p>{$item.goods_name}</p>
            </div>
            <div class="secbottom_price">
                <span>¥ {$isVip > 0 ? $item['vip_price'] : $item['price']}</span>
            </div>
        </li>
        {/foreach}
    </ul>
</div>

<!--底部-->
{include file="Public:footer" /}
</body>
<!-- Initialize Swiper -->
<script>
    var swiper = new Swiper('.swiper-container', {
        slidesPerView: 4,
        spaceBetween: 16,
        freeMode: true,
        pagination: {
            el: '.swiper-pagination',
            clickable: true,
        },
    });

    $(function () {
        $(".swiper-slide ").click(function () {
            $(this).addClass("swiper_slide_this").siblings().removeClass("swiper_slide_this")
        })
    })
</script>
</html>
